package string;

/**
 * String.trim():
 * 去除当前字符串两边的空白符
 */
public class TrimDemo {
    public static void main(String[] args) {
        String str = "     hello    world  ";
        String str1 = str.trim();//去除str两边的空格字符
        System.out.println(str);
        System.out.println(str1);
    }
}
